package com.koko.context;

/**
 * 利用线程的threadLocal收集当前请求的token
 */
public class FeignContext extends BaseContext{
    public static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void setCurrentToken(String token) {
        threadLocal.set(token);
    }
    public static String getCurrentToken() {
        return threadLocal.get();
    }

    public static void removeCurrentToken() {
        threadLocal.remove();
    }
}
